\hypertarget{class_water_u_i}{
\section{WaterUI Class Reference}
\label{class_water_u_i}\index{WaterUI@{WaterUI}}
}


{\ttfamily \#include $<$WaterUI.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_water_u_i_a0109e34834d0310af3d516b13969a2d2}{WaterUI} (\hyperlink{class_data_storage}{DataStorage} $\ast$pData)
\item 
\hyperlink{class_water_u_i_a3d33d4e0342511ba04dde8447c7a1ee5}{$\sim$WaterUI} ()
\item 
bool \hyperlink{class_water_u_i_ad90405739de942c7ed5cac4d156330ff}{confirmation} (string question)
\item 
string \hyperlink{class_water_u_i_ad5bdfc127516f99a7ed14bd22a034efc}{askQuestion} (string question)
\item 
void \hyperlink{class_water_u_i_abe9b94a5490f5c5e3fef1598d7b88e6c}{message} (string message)
\item 
void \hyperlink{class_water_u_i_ae4afa9244a38efb6374ce7dcd75910c2}{showData} ()
\item 
int \hyperlink{class_water_u_i_a4665f558d6583c355dc4589650ede3dd}{mainMenu} ()
\item 
int \hyperlink{class_water_u_i_a27bc827936296c4eed321de3a0b3fb33}{manageDataMenu} ()
\item 
int \hyperlink{class_water_u_i_adcf181d9f865eabdfb73c3b4a440189b}{manageNetworkMenu} ()
\item 
int \hyperlink{class_water_u_i_aedc192270f4454984fb5b2b3228d7e9b}{findSolutionsMenu} ()
\item 
int \hyperlink{class_water_u_i_a637278c07830c0ec215de51d5aa06088}{selectLocation} ()
\item 
int \hyperlink{class_water_u_i_a961ee54062c75631367bea4888d5a866}{selectInfrastruture} ()
\item 
int \hyperlink{class_water_u_i_af074efaf0e5c4a6dc496dae14de5a2aa}{selectReservoir} ()
\item 
int \hyperlink{class_water_u_i_a9de28e8230688997c15b334cc3fb6a40}{selectJuntion} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
View component of the MVC implementation. Methods from this class only present data to the user and serve as interface with users. Presentation using \hyperlink{class_graph_viewer}{GraphViewer} aren't included here to allow a easier migration to a graphical interface. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_water_u_i_a0109e34834d0310af3d516b13969a2d2}{
\index{WaterUI@{WaterUI}!WaterUI@{WaterUI}}
\index{WaterUI@{WaterUI}!WaterUI@{WaterUI}}
\subsubsection[{WaterUI}]{\setlength{\rightskip}{0pt plus 5cm}WaterUI::WaterUI (
\begin{DoxyParamCaption}
\item[{{\bf DataStorage} $\ast$}]{pData}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a0109e34834d0310af3d516b13969a2d2}
Constructor that receives the pointer to the data storage class. \hypertarget{class_water_u_i_a3d33d4e0342511ba04dde8447c7a1ee5}{
\index{WaterUI@{WaterUI}!$\sim$WaterUI@{$\sim$WaterUI}}
\index{$\sim$WaterUI@{$\sim$WaterUI}!WaterUI@{WaterUI}}
\subsubsection[{$\sim$WaterUI}]{\setlength{\rightskip}{0pt plus 5cm}WaterUI::$\sim$WaterUI (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a3d33d4e0342511ba04dde8447c7a1ee5}
A standard destructor. 

\subsection{Member Function Documentation}
\hypertarget{class_water_u_i_ad5bdfc127516f99a7ed14bd22a034efc}{
\index{WaterUI@{WaterUI}!askQuestion@{askQuestion}}
\index{askQuestion@{askQuestion}!WaterUI@{WaterUI}}
\subsubsection[{askQuestion}]{\setlength{\rightskip}{0pt plus 5cm}string WaterUI::askQuestion (
\begin{DoxyParamCaption}
\item[{string}]{question}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_ad5bdfc127516f99a7ed14bd22a034efc}
Presents the user with a question, receives a answer and returns it. \hypertarget{class_water_u_i_ad90405739de942c7ed5cac4d156330ff}{
\index{WaterUI@{WaterUI}!confirmation@{confirmation}}
\index{confirmation@{confirmation}!WaterUI@{WaterUI}}
\subsubsection[{confirmation}]{\setlength{\rightskip}{0pt plus 5cm}bool WaterUI::confirmation (
\begin{DoxyParamCaption}
\item[{string}]{question}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_ad90405739de942c7ed5cac4d156330ff}
Presents a question and asks and returns true if user enters \char`\"{}Y\char`\"{} or \char`\"{}y\char`\"{}, false otherwise. \hypertarget{class_water_u_i_aedc192270f4454984fb5b2b3228d7e9b}{
\index{WaterUI@{WaterUI}!findSolutionsMenu@{findSolutionsMenu}}
\index{findSolutionsMenu@{findSolutionsMenu}!WaterUI@{WaterUI}}
\subsubsection[{findSolutionsMenu}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::findSolutionsMenu (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_aedc192270f4454984fb5b2b3228d7e9b}
Algorithms menu. \hypertarget{class_water_u_i_a4665f558d6583c355dc4589650ede3dd}{
\index{WaterUI@{WaterUI}!mainMenu@{mainMenu}}
\index{mainMenu@{mainMenu}!WaterUI@{WaterUI}}
\subsubsection[{mainMenu}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::mainMenu (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a4665f558d6583c355dc4589650ede3dd}
Main menu. \hypertarget{class_water_u_i_a27bc827936296c4eed321de3a0b3fb33}{
\index{WaterUI@{WaterUI}!manageDataMenu@{manageDataMenu}}
\index{manageDataMenu@{manageDataMenu}!WaterUI@{WaterUI}}
\subsubsection[{manageDataMenu}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::manageDataMenu (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a27bc827936296c4eed321de3a0b3fb33}
Data management menu. \hypertarget{class_water_u_i_adcf181d9f865eabdfb73c3b4a440189b}{
\index{WaterUI@{WaterUI}!manageNetworkMenu@{manageNetworkMenu}}
\index{manageNetworkMenu@{manageNetworkMenu}!WaterUI@{WaterUI}}
\subsubsection[{manageNetworkMenu}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::manageNetworkMenu (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_adcf181d9f865eabdfb73c3b4a440189b}
Network management menu. \hypertarget{class_water_u_i_abe9b94a5490f5c5e3fef1598d7b88e6c}{
\index{WaterUI@{WaterUI}!message@{message}}
\index{message@{message}!WaterUI@{WaterUI}}
\subsubsection[{message}]{\setlength{\rightskip}{0pt plus 5cm}void WaterUI::message (
\begin{DoxyParamCaption}
\item[{string}]{message}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_abe9b94a5490f5c5e3fef1598d7b88e6c}
Just presents a message to the user. \hypertarget{class_water_u_i_a961ee54062c75631367bea4888d5a866}{
\index{WaterUI@{WaterUI}!selectInfrastruture@{selectInfrastruture}}
\index{selectInfrastruture@{selectInfrastruture}!WaterUI@{WaterUI}}
\subsubsection[{selectInfrastruture}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::selectInfrastruture (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a961ee54062c75631367bea4888d5a866}
Presents the complete list of infrastructures, asks the user for an id and checks if it is a valid option return that id or -\/1 if invalid. \hypertarget{class_water_u_i_a9de28e8230688997c15b334cc3fb6a40}{
\index{WaterUI@{WaterUI}!selectJuntion@{selectJuntion}}
\index{selectJuntion@{selectJuntion}!WaterUI@{WaterUI}}
\subsubsection[{selectJuntion}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::selectJuntion (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a9de28e8230688997c15b334cc3fb6a40}
Presents lists of all Junctions and asks for a valid ID. \hypertarget{class_water_u_i_a637278c07830c0ec215de51d5aa06088}{
\index{WaterUI@{WaterUI}!selectLocation@{selectLocation}}
\index{selectLocation@{selectLocation}!WaterUI@{WaterUI}}
\subsubsection[{selectLocation}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::selectLocation (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_a637278c07830c0ec215de51d5aa06088}
Presents lists of all Locations and asks for a valid ID \hypertarget{class_water_u_i_af074efaf0e5c4a6dc496dae14de5a2aa}{
\index{WaterUI@{WaterUI}!selectReservoir@{selectReservoir}}
\index{selectReservoir@{selectReservoir}!WaterUI@{WaterUI}}
\subsubsection[{selectReservoir}]{\setlength{\rightskip}{0pt plus 5cm}int WaterUI::selectReservoir (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_af074efaf0e5c4a6dc496dae14de5a2aa}
Presents the complete list of reservoirs, asks the user for an id and checks if it is a valid option return that id or -\/1 if invalid. \hypertarget{class_water_u_i_ae4afa9244a38efb6374ce7dcd75910c2}{
\index{WaterUI@{WaterUI}!showData@{showData}}
\index{showData@{showData}!WaterUI@{WaterUI}}
\subsubsection[{showData}]{\setlength{\rightskip}{0pt plus 5cm}void WaterUI::showData (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_water_u_i_ae4afa9244a38efb6374ce7dcd75910c2}
Show Data on the console. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Paulo/git/cal2012t4/water/src/\hyperlink{_water_u_i_8h}{WaterUI.h}\item 
C:/Users/Paulo/git/cal2012t4/water/src/\hyperlink{_water_u_i_8cpp}{WaterUI.cpp}\end{DoxyCompactItemize}
